package com.example.mq.demo.consumer;

import com.example.mq.demo.model.Message;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = "normal-topic", consumerGroup = "normal-consumer-group")
public class NormalMessageConsumer implements RocketMQListener<Message> {

    public void onMessage(Message message) {
        log.info("收到普通消息：{}", message);
    }
}